<!--For 按钮-->
<template>
        <el-form ref="form" :model="selectedCom" label-width="80px" style="margin-top:20px;position:relative">
          <el-form-item label="整体布局">
            <el-select v-model="selectedCom.layoutOption" placeholder="请选择">
              <el-option
              v-for="item in layoutOptions"
              :key="item"
              :label="item"
              :value="item">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="label名称">
            <el-input v-model="selectedCom.labelName"></el-input>
          </el-form-item>
          <el-form-item label="label布局" v-if="selectedCom.labelLayout!=''">
             <el-select v-model="selectedCom.labelLayout" placeholder="请选择">
              <el-option
              v-for="item in layoutOptions"
              :key="item"
              :label="item"
              :value="item">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="控件布局"  v-if="selectedCom.contentLayout!=''">
             <el-select v-model="selectedCom.contentLayout" placeholder="请选择">
              <el-option
              v-for="item in layoutOptions"
              :key="item"
              :label="item"
              :value="item">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="按钮样式"  v-if="selectedCom.type=='button'">
             <el-select v-model="selectedCom.style" placeholder="请选择">
              <el-option
              v-for="item in styleOptions"
              :key="item.name"
              :label="item.name"
              :value="item.name">
               <span style="float: left">{{ item.name }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{ item.description }}</span>
              </el-option>
            </el-select>
          </el-form-item>
         
        </el-form>
</template>

<script>
export default {
  data() {
    return {
      layoutOptions: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
      //按钮可选样式
       styleOptions: [
        { name: "primary", description: "主要" },
        { name: "success", description: "成功" },
        { name: "danger", description: "危险" },
        { name: "warning", description: "警告" },
        { name: "info", description: "信息" },
        { name: "inverse", description: "反向" }
      ],
    };
  },
  props: {
    selectedCom: Object,
  }
};
</script>